// 订单详情的schema
const mongoose = require('mongoose')
const Schema = mongoose.Schema
let ObjectId = Schema.Types.ObjectId;
const orderDetailSchema = new Schema({
    id: { type: ObjectId },
    order_id: String,
    good_id: String,
    name: String,
    price: Number,
    count: Number,
    image: String,
    create_date: { type: Date, default: Date.now() }
},{
    collections:'OrderDetail'   //避免mongoDB数据库在后面在加s
})
// 发布
mongoose.model('OrderDetail', orderDetailSchema)